libmyc.so:my_add.o my_sub.o
	gcc -shared -o $@ $^

%.o:%.c
	gcc -c -fPIC $<


.PHONY:clean
clean:
	rm -rf *.so *.o mylib mylib.tgz

.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib 
	cp -rf *.h mylib/include/
	cp -rf *.so mylib/lib/
	tar czf mylib.tgz mylib 
